package com.dp.mallchat.common.chat.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.dp.mallchat.common.chat.domain.entity.Contact;
import com.dp.mallchat.common.chat.domain.entity.Message;
import com.dp.mallchat.common.chat.domain.vo.resp.ChatRoomResp;
import com.dp.mallchat.common.chat.domain.vo.resp.MsgReadInfoResp;
import com.dp.mallchat.common.common.domain.vo.req.CursorPageBaseReq;
import com.dp.mallchat.common.common.domain.vo.resp.CursorPageBaseResp;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 会话列表 服务类
 * </p>
 *
 * @author <a href="https://gitee.com/baiDP">adu</a>
 * @since 2024-06-27
 */
public interface ContactService extends IService<Contact> {

    /**
     * 获取消息已读未读数
     * @param messageList 消息集
     * @param uid   uid
     * @return
     */
    Collection<MsgReadInfoResp> getMsgReadInfo(List<Message> messageList, Long uid);

    /**
     * 会话列表
     * @param request
     * @param uid
     * @return
     */
    CursorPageBaseResp<ChatRoomResp> getContactPage(CursorPageBaseReq request, Long uid);
}
